home *** CD-ROM | disk | FTP | other *** search
/ Teach Yourself VRML 2 in 21 Days / Teach Yourself VRML 2 in 21 Days.iso / mac / ISO9660 / 3rdparty / POLYTRAN / dos / PT_DOS.ZIP / DOC_1 / EXP_OGL.1 < prev    next >
Encoding:
Text File  |  1996-06-13  |  3.8 KB  |  87 lines

  1. .so psroff.inc        # Include the macros needed for output to Postscript
  2. .TH Export-OpenGL
  3. .SH NAME
  4. exp_ogl \- Open GL C Code geometry export filter
  5. .SH SYNOPSIS
  6. .PP
  7. This man page describes the options specific to the Open GL C Code
  8. geometry export converter.
  9. .PP
  10. .SH EXAMPLE CONVERSION SYNTAX
  11. .PP
  12. To convert a 3D Studio file to OpenGL C code using the default parameters 
  13. listed in the setup.ini file:
  14. .IP
  15. pt -i 3ds -o opengl filename.3ds
  16. .PP
  17. To convert a Lightwave file to OpenGL C code and override some of the default 
  18. options in setup.ini:
  19. .IP
  20. pt -i lw -o opengl -out-line-ending = cr filename.lw
  21. .PP
  22. .SH OVERVIEW
  23. .PP
  24. This geometry export converter writes out the scene database as a C code 
  25. program in the Open GL scene description language. The resulting program
  26. can then be compiled and used to draw the 3d database directly using
  27. OpenGL. The database is output as a series of polygons with vertex
  28. positions, normals, colors and texture coordinates. In addition, the
  29. surface definitions (materials) associated with each polygon is used
  30. to set up the OpenGL shading parameters.
  31. .PP
  32. Please note that each object is output as a separate C code function in
  33. the resulting file (ie: "Sphere#1" is enclosed in a function like: 
  34. Sphere#1() { open-gl-calls }).
  35. .PP
  36. .SH COMMAND LINE OPTIONS
  37. .PP
  38. The following options are specific to this import converter:
  39. .TP
  40. -o opengl
  41. This is the mandatory command line option which specifies that the data
  42. is to be exported using the Open GL C Code format converter.
  43. .TP
  44. -out-opengl-normals = [ yes | no ]
  45. If this option is set to 'yes' then vertex normals will be output along with 
  46. each polygon vertex using the glNormal3f() function. If a polygon does not 
  47. have any vertex normals associated with its vertices then nothing will
  48. be output.
  49. .TP
  50. -out-opengl-colors = [ yes | no ]
  51. If this option is set to 'yes' then vertex colors (r/g/b values)
  52. will be output along with each polygon vertex using the glColor3f() function.
  53. If a polygon does not have any colors associated with its vertices then 
  54. the default surface (material) color will be output before the polygons
  55. are specified.
  56. .TP
  57. -out-opengl-textures = [ yes | no ]
  58. If this option is set to 'yes' then texture mapping coordinates (u/v coordinates)
  59. will be output along with each polygon using the glTexCoords() function.
  60. .TP
  61. -out-opengl-materials = [ yes | no ]
  62. If this option is set to 'yes' then surface shading parameters will be 
  63. output along with the polygons as well as the basic vertex colors. The shading
  64. parameters set up Open GL's shading mechanism for the diffuse color, the 
  65. specular color and the Phong shininess value. These values are taken from the 
  66. current surface definition (material) that is associated with the current 
  67. polygon being output. Note that the shading parameters will only be output
  68. when they change from the previous values that have been output (for optimized 
  69. drawing).
  70. .TP
  71. -out-line-ending = [ cr | lf | crlf ]
  72. This common option selects which line terminator is to be used for the ASCII output 
  73. file. Files destined for DOS/PC machines should use 'crlf', files for UNIX 
  74. machines should use 'lf' and files for Macintosh machines should use 'cr'.
  75. The default is specific to which machine this converter is presently running
  76. on: 'crlf' for DOS/PC, 'lf' for UNIX and 'cr' for Macintosh. This option
  77. normally does not have to be specified unless you will be using the exported
  78. ASCII file on a different type of computer.
  79. .PP
  80. .SH CONVERSION NOTES
  81. .PP
  82. All concave polygons will be converted to convex polygons.
  83. .PP
  84. The ambient, diffuse and specular shading coefficients associated with 
  85. the current surface definition will not be multiplied into the vertex color 
  86. values.
  87.